#pragma once
#include <my_header.h>
//
#define CLIENT_REQUEST_CD 0
#define CLIENT_REQUEST_LS 1
#define CLIENT_REQUEST_PWD 2
#define CLIENT_REQUEST_MKDIR 3
#define CLIENT_REQUEST_RMDIR 4
#define CLIENT_REQUEST_PUTS 5
#define CLIENT_REQUEST_GETS 6
#define CLIENT_REQUEST_REMOVE 7
#define CLIENT_REQUEST_USR_EXIST 8
#define CLIENT_REQUEST_USR_GET_SALT 9
#define CLIENT_REQUEST_USR_GET_NEW_SALT 10
#define CLIENT_REQUEST_USR_LOGIN 11
#define CLIENT_REQUEST_USR_REGISTRATION 12
#define SERVER_RESPOND 13

//
typedef struct usrInfo_s {
    int cmd;
	int length;
    char data[1000];
    char *usrName;
    char *salt;
    char *ciphertext;
} usrInfo_t;//
//
bool usr_exist(const char* usrName);
int getsalt(const char *usrName, char *salt);
int getnewsalt(const char*usrName, char *salt);
int usr_Login(const char *usrName, const char *ciphertext);
int usr_registration(const char *usrName, const char *ciphertext);
